-content_for :head_css do
  =stylesheet_link_tag 'tag-it/tag-it'
  =stylesheet_link_tag 'tag-it/tagit.ui-zendesk'

-content_for :end_javascript do
  =javascript_include_tag 'tag-it/tag-it'
  :javascript
    $.ajax({
      type: '#{options[:method] || 'get'}',
      url: '#{url_for options[:url]}',
      success: function(data){
        $('##{id}').tagit({
          availableTags: data,
          allowSpaces: true,
          tagLimit: '#{options[:tagLimit]}',
          stopWritingOnTagLimit: true
        });
      }
    });
